// ExpenseMain :: ExpenseHeader + ExpenseWarn + ExpenseAmount + ExpenseBody; // 费用主体信息 ::  费用头部 + 预警模块 + 费用金额 + 费用表单
import React from 'react';
import 'styles/expense/expense-main.scss';
import ExpenseBody from './expense-body';
import ExpenseHeader from './expense-header';
import ExpenseUtil from './expense-util';

export default (props) => {
  const { close, handleUtil, isShrink, randomHash, auditTab, approvedKeys, changTab } = props;
  return (
    <section className={`expense-main ${isShrink && 'expense-main-shrink'}`}>
      <ExpenseHeader
        close={close}
        randomHash={randomHash}
        isShow={!isShrink}
        handleUtil={handleUtil}
        refreshApprovedKeys={props.refreshApprovedKeys}
      />
      <ExpenseBody
        isShow={!isShrink}
        randomHash={randomHash}
        auditTab={auditTab}
        approvedKeys={approvedKeys}
        changTab={changTab}
        getDesignationExpense={props.getDesignationExpense}
      />
      <ExpenseUtil
        isShow={isShrink}
        randomHash={randomHash}
        handleUtil={handleUtil}
      />
    </section>
  );
}
